package com.ruoyi.smart.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.smart.mapper.SmartPlanMapper;
import com.ruoyi.smart.domain.SmartPlan;
import com.ruoyi.smart.service.ISmartPlanService;

/**
 * 计划Service业务层处理
 * 
 * @author minwei
 * @date 2022-04-07
 */
@Service
public class SmartPlanServiceImpl implements ISmartPlanService 
{
    @Autowired
    private SmartPlanMapper smartPlanMapper;

    /**
     * 查询计划
     * 
     * @param id 计划主键
     * @return 计划
     */
    @Override
    public SmartPlan selectSmartPlanById(Long id)
    {
        return smartPlanMapper.selectSmartPlanById(id);
    }

    /**
     * 查询计划列表
     * 
     * @param smartPlan 计划
     * @return 计划
     */
    @Override
    public List<SmartPlan> selectSmartPlanList(SmartPlan smartPlan)
    {
        return smartPlanMapper.selectSmartPlanList(smartPlan);
    }

    /**
     * 新增计划
     * 
     * @param smartPlan 计划
     * @return 结果
     */
    @Override
    public int insertSmartPlan(SmartPlan smartPlan)
    {
        return smartPlanMapper.insertSmartPlan(smartPlan);
    }

    /**
     * 修改计划
     * 
     * @param smartPlan 计划
     * @return 结果
     */
    @Override
    public int updateSmartPlan(SmartPlan smartPlan)
    {
        return smartPlanMapper.updateSmartPlan(smartPlan);
    }

    /**
     * 批量删除计划
     * 
     * @param ids 需要删除的计划主键
     * @return 结果
     */
    @Override
    public int deleteSmartPlanByIds(Long[] ids)
    {
        return smartPlanMapper.deleteSmartPlanByIds(ids);
    }

    /**
     * 删除计划信息
     * 
     * @param id 计划主键
     * @return 结果
     */
    @Override
    public int deleteSmartPlanById(Long id)
    {
        return smartPlanMapper.deleteSmartPlanById(id);
    }

}
